Skip to content

Conversation

@kimi-p
Copy link
Contributor

@kimi-p kimi-p commented Apr 10, 2023

Motivation

To link Lambda span that are triggered by Step Functions with Step Functions span.

https://datadoghq.atlassian.net/browse/SLS-3333

What does this PR do?

This PR sets trace_id and parent_id when Step Functions Context Object is detected in the Lambda handler's event dictionary. The hashing function is implemented as backend and dd-lambda-js.

Testing Guidelines

Tested in sandbox account (trace link).

image

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@kimi-p kimi-p changed the title Python and Step Functions Span Linking Lambda and Step Functions Span Linking Apr 11, 2023
@kimi-p kimi-p marked this pull request as ready for review April 11, 2023 19:49
@kimi-p kimi-p requested a review from a team as a code owner April 11, 2023 19:49
@kimi-p kimi-p requested a review from joeyzhao2018 April 11, 2023 19:50
@kimi-p
Copy link
Contributor Author

kimi-p commented Apr 11, 2023

Size is over 86 kb for importing hashlib. Serverless-APM team is planning on reducing the size. It shouldn't be a blocker.

Copy link
Contributor

@joeyzhao2018 joeyzhao2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kimi-p kimi-p merged commit ce53280 into main Apr 12, 2023
@kimi-p kimi-p deleted the kimi.py-sf-linking branch April 12, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants